<form name="biz_ct_order_cancel_from" id="biz_ct_order_cancel_from">
	<table class="form" cellpadding=0 cellspacing=0>
		<tr>
			<td colspan=2 class="topTd"></td>
		</tr>
		<tr>
			<td class="item_title">原因：</td>
			<td><textarea name="order_tip" style="width:94%;height:80px" class="f-text"></textarea></td>
		</tr>
		<tr>
			<td colspan="2" style="text-align:center;">
				<input type="button" id="sure_cancel_ct_btn" name="sure_cancel_ct_btn" class="button" value="确定"  />
			</td>
		</tr>
		
		<tr>
			<td colspan=2 class="bottomTd"></td>
		</tr>
	</table>
	<input type="hidden" value="{$order_id}" name="order_id" />
</form>
<script type="text/javascript">
	jQuery(function(){
		$("#sure_cancel_ct_btn").bind("click",function(){
			if($.trim($("#biz_ct_order_cancel_from textarea[name='order_tip']").val())==""){
				alert("请输入撤销订单原因！");
				$("#biz_ct_order_cancel_from textarea[name='order_tip']").focus();
				return false;
			}
			if(confirm("确定撤销订单吗？")){
				var query = $("#biz_ct_order_cancel_from").serialize();
				$.ajax({
					url:ROOT + "?m=SupplierLocationOrder&a=do_cancel",
					data:query,
					type:"post",
					cache:false,
					dataType:"json",
					success:function(result){
						if(result.status==1)
						{
							window.location.reload();
						}
						else{
							alert(result.message);
						}
					}
				});
			}
			else{
				$.weeboxs.close();
			}
			return false;
		});
	});
</script>